package com.woniuxy.java106crm.mapper;

import com.woniuxy.java106crm.entity.Leads;
import com.woniuxy.java106crm.vo.marketing.LeadsPageSizeVo;
import com.woniuxy.java106crm.vo.marketing.LeadsStateVo;
import com.woniuxy.java106crm.vo.marketing.LeadsVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface MarketingMapper {
    List<Leads> findAll(LeadsPageSizeVo leadsPageSizeVo);

    /**创建销售机会*/
    boolean addLeads(Leads leads);

    /**编辑销售机会*/
    boolean updateLeads(Leads leads);

    /**删除销售机会*/
    boolean delLeadsById(int id);

    /**根据id查询销售机会*/
    Leads findLeadsById(int id);

    /**根据id修改修改指派人和指派的状态*/
    boolean updateAppointor(LeadsVo leadsVo);

    /**根据id查询指派的时间*/
    String selectByAppointTime(int id);

    /**根据id修改状态*/
    boolean updateStatById(LeadsStateVo leadsStateVo);

    /**查询有无指派权限*/
    int haveRole(int uid);
}
